/**
 * 登录返回信息
 */
export class LoginDto {
  public appId: string; // 登录的是那个应用
  public accessToken: string; // 用户token
  public validTime: number; // token有效期
  public updateTime: any; // 创建时间
  public refreshToken: string; // 刷新token
  public account: string; // 用户账号
  public userId: string; // 用户id
  public userIds: Array<any>; // 用户组下的用户id集合

  constructor(data: any = {}) {
    this.appId = data.appId;
    this.accessToken = data.accessToken;
    this.validTime = data.validTime;
    this.updateTime = data.updateTime;
    this.refreshToken = data.refreshToken;
    this.account = data.account;
    this.userId = data.userId;
    this.userIds = data.userIds;
  }
}

/**
 * 系统信息
 */
export class AppInfoDto {
  public id; // 主键id
  public key; // 应用key
  public value; // 应用值
  public describe; // 描述
  public appId; // 应用id
  public type; // 类型
  public status; // 状态
  public createTime; // 创建时间
  public updateTime; // 更新时间

  constructor(data: any = {}) {
    this.id = data.id;
    this.key = data.key;
    this.value = data.value;
    this.describe = data.describe;
    this.appId = data.appId;
    this.type = data.type;
    this.status = data.status;
    this.createTime = data.createTime;
    this.updateTime = data.updateTime;
  }
}

export class Node {
  public node: string; // 节点
  public parentNode: string; // 父节点
  public seq?: number; // 排序
  public isLeaf?: boolean; // 是否是子节点
  public children?: Array<Node>; // 子节点集合
  public data?: any; // 其他数据
}

